#include "settabu.h"
#include "ui_settabu.h"

setTabu::setTabu(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::setTabu)
{
    ui->setupUi(this);
    ui->iter->setRange(0,100000000);
    ui->iterImprov->setRange(0,100000000);
    ui->improv->setRange(0,100000000);
    ui->tebuLength->setRange(0,100000000);
    ui->iterJump->setRange(0,100000000);
    ui->iterLocalJump->setRange(0,100000000);
    ui->kara->setRange(0,100000000);
    ui->nagroda->setRange(0,100000000);
}

setTabu::~setTabu()
{
    delete ui;
}

void setTabu::on_tabu_param(int iter, int iterImprov, int improv, int tabuLength, int iterJump, int iterLocalJump, int kara, int nagroda){
    ui->iter->setValue(iter);
    ui->iterImprov->setValue(iterImprov );
    ui->improv->setValue(improv);
    ui->tebuLength->setValue(tabuLength );
    ui->iterJump->setValue(iterJump);
    ui->iterLocalJump->setValue(iterLocalJump);
    ui->kara->setValue(kara);
    ui->nagroda->setValue(nagroda);
}

void setTabu::on_pushButton_clicked()
{
    emit saveTabu(ui->iter->value(),ui->iterImprov->value() ,ui->improv->value(), ui->tebuLength->value(),
                  ui->iterJump->value(), ui->iterLocalJump->value(),ui->kara->value(),ui->nagroda->value());
    this->close();
}
